import org.molamil.acto.validators.Validator;
import org.molamil.acto.validators.ValidatorResult;
import org.molamil.acto.core.Logger;
import org.molamil.commons.ObjectUtil;

import mx.events.EventDispatcher;

/**
 * @author Jorge Hernandez
 */
class org.molamil.acto.validators.vld.AbstractVld implements Validator {
	
	
	// Properties
	
	private static var log:Logger = Logger.getLogger("AbstractValidator");
	
	
	// Constructor
	
	private function AbstractVld() {
		EventDispatcher.initialize(this);
	}
	
	
	// Functions
	
	public function dispatchEvent(eventObj:Object):Void {}
	public function addEventListener(event:String, handler):Void {}
	public function removeEventListener(event:String, handler):Void {}
	
	public function validate(source:Object, props:Object):ValidatorResult {
		log.warning("[Abstract] validate() to be implemented.");
		return null;
	}
	
	public function decorate(source:Object, props:Object):Object {
		return ObjectUtil.clone(source);
	}
	
	
}
